package name.elftesting.vnctest;

import java.io.File;
import java.io.FileOutputStream;

/**
 * 
 * @author Xiaoping Wu
 * 
 */
public class JavaFormatScript {

	public String writeScript(String lines, String name) {
		StringBuffer templete = new StringBuffer(
				"import name.elftesting.vnctest.LanguageTemplete;\n");
		templete.append("import java.awt.Rectangle;\n");
		templete.append("import java.awt.image.BufferedImage;\n");
		templete.append("import java.io.*;\n");
		templete.append("import javax.imageio.ImageIO;\n");
		templete.append("import name.elftesting.vnctest.VncElf;\n");
		templete.append("public class " + name
				+ " implements LanguageTemplete {\n");
		templete.append("public void run(){\n");
		System.out.println(lines);
		templete.append(lines);
		//templete.append("return null;\n");
		templete.append("}\n");
		templete.append("private VncElf elf; \n");
		templete.append("public void setElf(VncElf elf){\n");
		templete.append("this.elf=elf;\n");
		templete.append("}\n");
		templete.append("public VncElf getElf(){\n");
		templete.append("return elf;\n");
		templete.append("}\n");
		templete.append("}\n");

		return templete.toString();
	}

}
